package com.beone.smart.userCenter.utils;

import org.springframework.stereotype.Component;
import org.springframework.util.DigestUtils;

import java.util.Random;

/**
 * @Date: 2019/8/27
 * @Author: yangjie
 * desc:  票据生产工具
 **/
@Component
public class TicketKeyUtil {

    public String getMD5(String value) {
        //盐，用于混交md5
        String slat = "&%7A2Asc*&%$$#@";
        String base = value + "/s1A#24@!~*~(8*)/" + slat + new Random().nextInt();
        return DigestUtils.md5DigestAsHex(base.getBytes());
    }
}
